class CisController < ApplicationController
  # GET /cis
  # GET /cis.xml
  def index
    @cis = Ci.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @cis }
    end
  end

  # GET /cis/1
  # GET /cis/1.xml
  def show
    @ci = Ci.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @ci }
    end
  end

  # GET /cis/new
  # GET /cis/new.xml
  def new
    @ci = Ci.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @ci }
    end
  end

  # GET /cis/1/edit
  def edit
    @ci = Ci.find(params[:id])
  end

  # POST /cis
  # POST /cis.xml
  def create
    @ci = Ci.new(params[:ci])

    respond_to do |format|
      if @ci.save
        flash[:notice] = 'Ci was successfully created.'
        format.html { redirect_to(@ci) }
        format.xml  { render :xml => @ci, :status => :created, :location => @ci }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @ci.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /cis/1
  # PUT /cis/1.xml
  def update
    @ci = Ci.find(params[:id])

    respond_to do |format|
      if @ci.update_attributes(params[:ci])
        flash[:notice] = 'Ci was successfully updated.'
        format.html { redirect_to(@ci) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @ci.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /cis/1
  # DELETE /cis/1.xml
  def destroy
    @ci = Ci.find(params[:id])
    @ci.destroy

    respond_to do |format|
      format.html { redirect_to(cis_url) }
      format.xml  { head :ok }
    end
  end
end
